package com.mingyuan.library.provider.lending.model.command;

import com.mingyuan.library.provider.common.dto.Command;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 读者预定图书命令请求参数
 * @author yangzk
 * @version 1.0.0
 * @date 2024.01.18 08:21
 */

@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "读者预定图书请求命令参数")
public class PlaceOnHoldCommand extends Command implements Serializable {
    private static final long serialVersionUID = 7579826338168824646L;
    /**
     * 读者ID
     */
    @NotBlank(message = "读者ID不能为空")
    @ApiModelProperty(name = "patronId", value = "读者ID", required = true)
    private String patronId;
    /**
     * 图书ID
     */
    @NotBlank(message = "图书ID不能为空")
    @ApiModelProperty(name = "bookId", value = "图书ID", required = true)
    private String bookId;
    /**
     * 图书馆分馆ID
     */
    @NotBlank(message = "图书馆分馆ID不能为空")
    @ApiModelProperty(name = "libraryBranchId", value = "图书馆分馆ID", required = true)
    private String libraryBranchId;
    /**
     * 预定天数
     */
    @NotNull(message = "预定天数不能为空")
    @ApiModelProperty(name = "numberOfDays", value = "预定天数")
    private Integer numberOfDays;
}
